package com.example.frenchconjugationquiz.gui;

import com.example.frenchconjugationquiz.R;

import android.content.Context;
import android.graphics.Typeface;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.widget.LinearLayout;
import android.widget.TextView;

public class CustomTextView extends LinearLayout
{
	TextView tv;

	public CustomTextView(Context context, AttributeSet attrs)
	{
		super(context, attrs);
		if (!isInEditMode())
		{

			LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
			inflater.inflate(R.layout.cc_text_view, this, true);

			LinearLayout ll = (LinearLayout) getChildAt(0);
			tv = (TextView) ll.getChildAt(0);
		}
	}

	public CustomTextView(Context context)
	{
		this(context, null);
	}

	public void setText(CharSequence text)
	{
		tv.setText(text);
	}

	public void setTypeface(Typeface tf)
	{
		tv.setTypeface(tf);

	}
}
